<%@ page language="java" contentType="text/html; charset=utf-8" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="bb" class="weaver.general.BaseBean"/>
<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="weaver.general.Util" %>
<%
    JSONObject jsonData = new JSONObject();
    String fphm = Util.null2String( request.getParameter( "fphm" ) );
    int counts = 0;
    boolean flag = false;
    rs.executeQuery( "select count(id) from formtable_main_199_dt2 where fphm=", fphm );
    if(rs.next()){
        int count = Util.getIntValue( rs.getString( 1 ) );
        counts += count;
    }

    for(int i=1;i<=5;i++){
        rs.executeQuery( "select count(id) from formtable_main_196_dt"+i+" where fph=", fphm );
        rs.next();
        int count = Util.getIntValue( rs.getString( 1 ) );
        counts += count;
    }
    if(counts>0){
        flag = true;
    }
    jsonData.put( "flag", flag );
    out.print( jsonData.toJSONString() );
    bb.writeLog( "getInvoice_Ajax=" + jsonData.toJSONString() );
%>
